<template>
<h3>内连事件处理器</h3>
  <button v-on:click="count++">ADD</button>
  <button @click="count++">ADD</button>
  <p>{{count}}</p>
  <h3>函数添加</h3>
  <button @click="addCount">ADD</button>
</template>

<script>
export default {
  name: "EventDemo1",
  data(){
    return{
      count:0
    }
  },
  methods:{
    addCount(){
      console.log("点击了")
      //所有写在data里面的都可以用this引用
      this.count++
    }
  }
}
</script>

<style scoped>

</style>
